package com.hupu.controller;

import com.hupu.pojo.User;
import com.hupu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/{id}")
    public User queryUserById(@PathVariable("id")Long id) throws InterruptedException {
        return this.userService.queryUserById(id);
    }

}
